Skip to content

feat: add ActsTrajectoriesMerger #1824

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
May 7, 2025
Merged

feat: add ActsTrajectoriesMerger #1824

merged 9 commits into from
May 7, 2025

Conversation

wdconinc
Copy link
Contributor

Briefly, what does this PR introduce?

This PR pulls the ActsTrajectoriesMerger and non-owning JOmniFactory Output support out of #1744.

What kind of change does this PR introduce?

Please check if this PR fulfills the following:

  • Tests for the changes have been added
  • Documentation has been added / updated
  • Changes have been communicated to collaborators

Does this PR introduce breaking changes? What changes might users need to make to their code?

No.

Does this PR change default behavior?

No.

@wdconinc wdconinc requested review from a team and simonge and removed request for a team April 23, 2025 20:24
simonge
simonge previously approved these changes May 1, 2025
Copy link
Contributor

@simonge simonge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

The B0 PR confirms this actually works. Just to check though, is this creating new Trajectories which point to the data in the two input collections?

If the factory doesn't own the new trajectory, what does?

@wdconinc wdconinc force-pushed the acts-trajectories-merger branch from 0bea260 to 2414b48 Compare May 6, 2025 02:37
@wdconinc
Copy link
Contributor Author

wdconinc commented May 6, 2025

Just to check though, is this creating new Trajectories which point to the data in the two input collections?

If the factory doesn't own the new trajectory, what does?

Good point.

@wdconinc
Copy link
Contributor Author

wdconinc commented May 6, 2025

Just to check though, is this creating new Trajectories which point to the data in the two input collections?
If the factory doesn't own the new trajectory, what does?

Good point.

The reason why I introduced this data ownership policy was to address memory issues that I had attributed to duplicate deletes due to storing the same track pointers in multiple ActsExamples::Trajectories. That's why I had naively made it non-owning, since I assume what was happening was that the ActsExamples::Trajectories destructor that deleted the tracks.

It turned out to be a different problem entirely: insufficient clearing of the pointer vectors in JOmniFactory (cc @nathanwbrei: sometimes the std::vector<T*> has non-zero size when entering Process). After fixing that, there is no more need for the data ownership policy boolean, or the underlying functionality in JOmniFactory.

Copy link
Contributor

@simonge simonge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, looks much cleaner.

@wdconinc wdconinc added this pull request to the merge queue May 7, 2025
Merged via the queue into main with commit 14d161c May 7, 2025
114 of 117 checks passed
@wdconinc wdconinc deleted the acts-trajectories-merger branch May 7, 2025 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants